package com.lms.common.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lms.common.pure.entity.IBaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Schema(name = "用户信息")
public class SysUser implements IBaseEntity {
    @TableId(type = IdType.AUTO)
    @Schema(name = "用户主键id")
    private Long id;
    @Schema(name = "用户名")
    private String username;
    @Schema(name = "昵称")
    private String nickname;
    @JSONField(serialize = false)
    @Schema(name = "密码")
    private String password;
    @Schema(name = "头像")
    private String avatar;
    @Schema(name = "性别")
    private String sex;
    @Schema(name = "手机")
    private String phone;
    @Schema(name = "部门id")
    private String deptId;
    @Schema(name = "是否启用")
    private boolean enabled;
    @Schema(name = "生日")
    private LocalDate bday;
    @Schema(name = "创建时间")
    private LocalDateTime createTime;
    @Schema(name = "更新时间")
    private LocalDateTime updateTime;
    @Schema(name = "创建人")
    private String createBy;
    @Schema(name = "更新人")
    private String updateBy;

    @Override
    public Serializable getKey() {
        return id;
    }
}
